package max.ta.stock.indicator;

import java.util.List;

import max.ta.data.entity.StockQuote;
import max.ta.data.entity.StockValueType;

public class SMAIndicator
	extends MAIndicator {

    public SMAIndicator(int window) {
	super(window);
    }

    @Override
    public double computeMA(List<StockQuote> previous, StockValueType type) {
	int window = this.getWindowSize();
	double ma = sum(previous, type) / window;
	return ma;
    }

}
